The invention relates to sample rate conversion techniques and, more particularly, to methods and apparatus for converting between a compact disc sample rate and a digital audio tape sample rate.
There exist several different algorithms for converting from a first sample rate, e.g., a compact disc (CD) sample rate of 44.1 KHz, to a second sample rate, e.g., a digital audio tape (DAT) sample rate of 48 kHz. Examples of such known techniques are described in: S. Park, xe2x80x9cA Real-Time Method for Sample-Rate Conversion from CD to DAT,xe2x80x9d Proc. IEEE Int. Conf. Consumer Electronics, pp. 360-361, Chicago, Ill., Jun. 18-20, 1990; S. Park et al., xe2x80x9cA Novel Structure for Real-Time Digital Sample-Rate Converters with Finite Precision Error Analysis,xe2x80x9d pp. 3613-3616, ICASSP, 1991; S. Cucchi et al., xe2x80x9cDSP Implementation of Arbitrary Sampling Frequency Conversion for High Quality Sound Application,xe2x80x9d pp. 3609-3612, ICASSP, 1991; and J. O. Smith et al., xe2x80x9cA Flexible Sampling Rate Conversion Methodxe2x80x9d, Proc. ICAAP, 1984. It is essential to have a good sampling rate converter to change and synchronize the two different sampling rates without losing any of the useful information in the original digital signal being sampled. Some conventional sampling rate conversion techniques are described below.
A simple approach shown in FIG. 1 provides for converting a digital input signal into an analog signal in a digital-to-analog (D/A) converter 10 and then re-sampling the analog signal into the desired sampling rate in analog-to-digital (A/D) converter 14. A low-pass filter 12 interposed between the D/A converter 10 and the A/D converter 14 aids in reconstructing the analog signal. However, it is known that the analog low-pass filter 12, also called the analog reconstruction (anti-aliasing) filter, is extremely expensive and difficult to implement. The harmonic and noise distortion that occurs in the conversion from D/A and A/D also degrades overall performance.
Another conventional technique has been popularly used for digital sampling rate conversion in a fixed ratio M/N scenario, where M and N are both positive integers. FIG. 2 illustrates such an approach which employs a 1:M interpolator 16, a digital low-pass filter 18 and an N:1 decimator 20. The values M and N are determined by the ratio of output sampling rate to input sampling rate. This approach can be used in practice when the integers M and N are manageable numbers, typically less than 10. Thus, the input samples are first interpolated up by a factor M, passed through the digital low-pass filter and then decimated down by a factor N. In the application of sampling rate conversion from CD to DAT, the M and N are 160 and 147, respectively. However, attempting to implement CD to DAT sample rate conversion in this manner in a digital signal processor (DSP) requires an extremely large number of MIPS (million instructions per second). Hence, this method is not realistic for the application of sample rate conversion from CD to DAT.
The technique described in the above-mentioned S. Park articles uses the sinc function as shown in equation (1) below to generate a fractionally sampled signal for the sampling conversion from the CD rate to the DAT rate:                               sin          ⁢                      xe2x80x83                    ⁢                      c            ⁡                          (              x              )                                      =                                            sin              ⁢                              xe2x80x83                            ⁢                              π                ⁡                                  (                  x                  )                                                                    π              ⁡                              (                x                )                                              .                                    (        1        )            
This conventional approach is based on the fact that for every 147 input samples, 160 output samples are generated. In other words, at the transfer of every 160 output samples, the input and output sampling instants are synchronized again. Let xcfx84n be the current delay value for the output sampling index n and the current sampling index k, thus:
xcfx84n=nTDATxe2x88x92kTCDxe2x80x83xe2x80x83(2)
where TDAT and TCD are the sampling periods of the DAT output signal and the CD input signal, respectively. In equation (1), there are 160 different delay values xcfx84n in total for 1xe2x89xa6nxe2x89xa6160 and 1xe2x89xa6kxe2x89xa6147. Each xcfx84n has its own associated 63-tap FIR coefficients to generate the corresponding output samples. This is illustrated in the sample rate converter of FIG. 3 which employs delays 22 and adder 24 to generate the output samples. In this implementation, the Blackman-Harris window (see D. F. Elliott, ed., xe2x80x9cHandbook of Digital Signal Processing Engineering Application,xe2x80x9d Academic Press, 1987) has been used to optimize for maximum side-lobe attenuation to improve performance. One primary drawback of this approach is that it requires a very large table (memory space) to store the predetermined coefficients (i.e., 160xc3x9763 coefficients). In real-time DSP implementation, the size of data and program memory is often a key factor in the cost reduction.
Accordingly, there exists a need for a sample rate conversion technique that requires less memory capacity and/or less MIPS as compared to conventional sample rate conversion approaches.
The present invention provides improved methods and apparatus for sample rate conversion between a first audio format and a second audio format. In one aspect of the invention, a method of converting between a sampling rate associated with a first audio format and a second audio format includes up-sampling an input signal sampled at the sample rate associated with the first audio format. Then, the up-sampled signal is filtered as a function of a fractional delay to generate an output signal sampled at the sample rate associated with the second audio format. The fractional delay is computed from the sample rates associated with the first and second audio formats.
In one embodiment, the sample rates that are converted between are associated with a compact disc format having a sample rate of about 44.1 kHz and a digital audio tape format having a sample rate of about 48 kHz. In such case, the input samples are preferably up-sampled by a factor of two and the samples are then preferably filtered in accordance with a third order six taps coefficient finite impulse response filtering technique.
Advantageously, the methodology of the present invention permits sample rate conversion from the CD format to the DAT format and from the DAT format to the CD format without changing filter coefficients. Further, the present invention requires less memory capacity and/or less MIPS in a real-time DSP implementation as compared to conventional sample rate conversion approaches.